﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Setting_AddEmployee : SessionPage
{
    protected SYS_Employee empl = new SYS_Employee();
    protected bool ReadOnly = false;

    LogicLayer mgr = new LogicLayer();
    protected string tip = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        //检查权限
        this.VerifyFunction("setting");

        if (IsPostBack)
        { 
            SYS_Employee em = new SYS_Employee();
            em.EmplID = Guid.NewGuid().ToString();
            em.EmplName = Request.Form["emplName"];

            if (mgr.AddSYS_Employee(em))
                Response.Write("<script>window.opener.location.reload();window.close();</script>");
            else
                tip = "保存失败!";
        }
    }
}